﻿using System;
using System.Diagnostics;

namespace SfsTools.Core
{
    /// <summary>
    /// Represents an unused index area entry.
    /// </summary>
    internal class UnusedIndexEntry : IndexEntry
    {
        #region Methods

        /// <summary>
        /// Accepts a visitor.
        /// </summary>
        /// <param name="visitor">The visitor.</param>
        [DebuggerStepThrough]
        public override void AcceptVisitor(IIndexEntryVisitor visitor)
        {
            visitor.VisitUnused(this);
        }

        #endregion

        #region Constructors
        /// <overloads>Initializes a new instance of <see cref="UnusedIndexEntry"/>.</overloads>
        /// <summary>
        /// Initializes a new instance of <see cref="UnusedIndexEntry"/>.
        /// </summary>
        [DebuggerStepThrough]
        public UnusedIndexEntry(long position, byte[] buffer)
            : base(position, buffer)
        {
            // Set code.
            buffer[0] = 0x10;
        }
        #endregion
    }
}
